﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>XXX公司ERP系统</title>
    <link href="~/libs/scripts/layui-v2.5.6/layui/css/layui.css" rel="stylesheet" />
</head>
<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <div class="layui-logo">ERP系统</div>
            <!-- 头部区域（可配合layui已有的水平导航） -->
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                        贤心
                    </a>
                </li>
                <li class="layui-nav-item"><a href="">退出</a></li>
            </ul>
        </div>

        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                <ul class="layui-nav layui-nav-tree" lay-filter="test">
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;">系统设置</a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;" onclick="loadPage('/RBAC/UserView')">用户管理</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/RBAC/PermissionView')">权限管理</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/RBAC/RoleView')">角色管理</a></dd>
                           
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">人资系统</a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;" onclick="loadPage('/HumanResources/JobGradeManagement')">职级管理</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/TalentRegistration/TalentRegistrationView')">人才登记</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/HumanResources/interview')">面试管理</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/OnboardingReview/OnboardingReviewView')">入职申请</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/HumanResources/OnboardingAuditsView')">入职审核</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/Home/TestPage')">测试页面</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">生产系统</a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;">主数据</a>
                                <dl class="layui-nav-child">
                                    <dd><a href="javascript:;" onclick="loadPage('/MaterialType/Index')">物料产品分类</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionSystem/MasterData/MaterielView')">物料产品管理</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/customer/CustomerView')">客户管理</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionSystem/SupplierModel/SupplierModelView')">供应商管理</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/Workmanship/Workmanships')">工艺流程</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/Procedure/ProcedureView')">工序设置</a></dd>
                                    <dd><a href="javascript:;">工艺流程</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionSystem/Workshop/Index')">车间设置</a></dd>
                                    <dd><a href="javascript:;">工作站</a></dd>
                                </dl>
                            </dd>
                            <dd>
                                <a href="javascript:;">生产管理</a>
                                <dl class="layui-nav-child">
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionSystem/ProductionManagement/CustomerOrderView')">客户订单</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/Prouduction/ProuductionView')">生产工单</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/Prouduction/ProductionGanttView')">生产排产</a></dd>
                                    <dd><a href="/OrderDispatch/OrderDispatchView">生产派单</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionSystem/ProductionMaterial/Index')">生产领料</a></dd>
                                    <dd><a href="javascript:;">生产排产</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/OrderDispatch/OrderDispatchView')">生产派单</a></dd>
                                    <dd><a href="javascript:;">生产领料</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionSystem/ProductionManagement/ShowProductionMaterialReturnView')">生产退料</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionSystem/ProductionReporting/Index')">生产报工</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionWasteOrder/ProductionWasteOrderView')">生产废料</a></dd>
                                </dl>
                            </dd>
                            <dd>
                                <a href="javascript:;">设备管理</a>
                                <dl class="layui-nav-child">
                                    <dd><a href="javascript:;" onclick="loadPage('/EquipmentType/EquipmentTypeList')">设备类型设置</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/DeviceLedger/DeviceLedgerView')">设备台账</a></dd>
                                    <dd><a href="javascript:;">点检保养项目</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionSystem/Maintenanceplan/Index')">点检保养计划</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/DeviceLedger/RepairOrderView')">维修单</a></dd>
                                </dl>
                            </dd>
                            <dd>
                                <a href="javascript:;">质量管理</a>
                                <dl class="layui-nav-child">
                                    <dd><a href="javascript:;">检测项设置</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/PendingTask/PendingTaskList')">待检任务</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ItemSettings/ItemSettingsView')">检测项设置</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/PendingTask/PendingTaskList')">待检任务</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/IncomingInspection/IncomingInspectionView')">来料检验</a></dd>
                                    <dd><a href="javascript:;">过程检验</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/ProductionSystem/OutgoingInspection/Index')">出货检验</a></dd>
                                </dl>
                            </dd>
                            <dd>
                                <a href="javascript:;">排班管理</a>
                                <dl class="layui-nav-child">
                                    <dd><a href="javascript:;" onclick="loadPage('/ShiftSchedulingManagement/ShowTeamManagementView')">班组设置</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/CrewScheduling/CrewSchedulingIndex')">排班计划</a></dd>
                                    <dd><a href="javascript:;">节假日设置</a></dd>
                                    <dd><a href="javascript:;" onclick="loadPage('/Workforcemanagement/ShiftschedulecalendarView')">排班日历</a></dd>

                                </dl>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">仓储管理</a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;">库存信息</a>
                                <dl class="layui-nav-child">
                                    <dd><a href="javascript:;" onclick="loadPage('/WarehouseManagement/InventoryModel/Index')">库存现有量</a></dd>
                                </dl>
                            </dd>
                            <dd><a href="javascript:;" onclick="loadPage('/WarehouseManagement/WarehouseSetting/Index')">仓库设置</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/WarehouseManagement/ProcurementView')">采购入库</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/SupplierReturns/SupplierReturnsView')">供应商退货</a></dd>
                            <dd><a href="javascript:;">销售出库</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/SalesReturns/SalesReturnsView')">销售退货</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/WarehouseManagement/TransferTransfers')">转移调拨</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/WarehouseManagement/Codingmanagement/Index')">赋码管理</a></dd>
                            <dd><a href="javascript:;">装箱管理</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/InventoryCounts/InventoryCountsView')">库存盘点</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/Outsourcing/OutsourcingList')">外协发料</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/OutsourcingWarehousing/OutsourcingWarehousingView')">外协入库</a></dd>
                            <dd><a href="javascript:;" onclick="loadPage('/WarehouseManagement/ProductsInbound/ProductsInboundView')">产品入库</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">    
                        <a href="javascript:;">订单管理</a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;" onclick="loadPage('/OrderManagement/SalesOrder/Index')">销售订单</a></dd>
                            <dd><a href="javascript:;">销售送货单</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">数据分析</a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;" onclick="loadPage('/Picture/PieChartsView')">库存数据</a></dd>
                            <dd><a href="javascript:;">物料出入库对比</a></dd>
                            <dd><a href="javascript:;">物料流转数据</a></dd>
                        </dl>
                    </li>
                </ul>
            </div>
        </div>

        <div class="layui-body">
            <!-- 内容主体区域 iframe:内联嵌套框架-->
            <div style="padding: 15px; height: calc(100vh - 120px);">
                <iframe id="mainFrame" width="100%" height="100%" frameborder="0" src="" style="border: none;"></iframe>
            @* <div style="padding: 15px;">
                <iframe id="contentFrame" width="1700" height="950" src=""></iframe> *@
            </div>
        </div>

        <div class="layui-footer">
            <!-- 底部固定区域 -->
            © layui.com - 底部固定区域
        </div>
    </div>
    <script src="~/libs/scripts/layui-v2.5.6/layui/layui.js"></script>
    <script>
        //JavaScript代码区域
        layui.use(['element', 'jquery'], function () {
            var element = layui.element;
            var $ = layui.jquery;
            
            // 处理菜单点击事件
            $('.layui-nav-item a').click(function() {
                var url = $(this).data('url');
                if (url) {
                    $('#contentFrame').attr('src', url);
                }
            });
            
            // 设置默认页面
            $('.menu-item').click(function() {
                var url = $(this).data('url');
                if (url) {
                    $('#contentFrame').attr('src', url);
                }
            });
        });
        
        // 加载页面到iframe的函数
        function loadPage(url) {
            console.log('loadPage函数被调用，URL:', url);
            var iframe = document.getElementById('mainFrame');
            if (iframe) {
                console.log('找到iframe元素');
                if (url) {
                    iframe.src = url;
                    console.log('正在加载页面:', url);
                    
                    // 添加加载状态提示
                    iframe.onload = function() {
                        console.log('页面加载完成:', url);
                    };
                    
                    iframe.onerror = function() {
                        console.error('页面加载失败:', url);
                    };
                } else {
                    console.error('URL为空');
                }
            } else {
                console.error('找不到iframe元素');
            }
        }
    </script>
</body>
</html>
